Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] New API reference generator #1537

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Mar 5, 2025

@michaldudak michaldudak added the scope: docs-infra Specific to the docs-infra product label Mar 5, 2025
Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit d696318
🔍 Latest deploy log https://app.netlify.com/sites/base-ui/deploys/67ceb64c21600500085f7062
😎 Deploy Preview https://deploy-preview-1537--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 7, 2025
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to set up a test case for hook types (maybe after useRender is merged). Also, could be try running this in other repos?

Would it make sense to make the extractor part this GitHub org, to make it easier to make changes for other people?

@@ -41,12 +40,10 @@
},
"cssVariables": {
"--accordion-panel-height": {
"description": "The accordion panel's height.",
"type": "number"
"description": "The accordion panel's height."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the previous logic for the @type info?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the extractor doesn't handle the @type tag yet, but will soon.

Comment on lines 30 to 32
"type": "boolean | undefined",
"default": "false",
"required": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit strange. It says it's required, but we allow undefined as value. Is there a way to change the props that have default values not to be flagged as required?

"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: unknown, state: unknown) => React.ReactElement)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to specify the state & props for each component.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this doesn't look right. These aren't really the props of a component but attributes to be spread on the rendered HTML element. I'll try to display in a better way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to exclude internal components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: out-of-date The pull request has merge conflicts and can't be merged scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants